Get

Function

This API is used to get face statistics.

Request Message

Table 1

ParameterRangeTypeDescription
MsgIdnull
Engine0intWhich search engine to use, 0 or 1, used with the search interface
StartIndex0intThe starting index of the request, for example, the first time: 0-9999, the second time: 10000-19999, then the StartIndex is 0, 10000 respectively
CountintThe number of pieces of face statistical information requested

Sample:

POST API/AI/FaceStatistics/Get HTTP/1.1
{
	"version":"1.0",
	"data": {
		"MsgId": null,
		"Engine": 0,		
		"StartIndex": 0,
		"Count": 10000 
	}
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
MsgIdnull
Result0intSee the results AI > Face search > Search >Table 3
channel_maxintMaximum number of channels
CountintTotal number of objects for this response
StatisticsarrayFace statistics JSON (show as follow TableTable 3)

Table 3

ParameterRangeTypeDescription
GroupintThe group ID to which the face belongs
Timeunsigned long longUnix timestamp such as: 1540444116(When displaying, it will be displayed uniformly according to the UTC time zone, such as: 2020-07-12 00:00:00)
ChnintThe channel to which the face belongs
StrChn“CH1”…”CH1x”
The number of channels depends on the capabilities of the device.
stringThe channel to which the face belongs

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
	"data": {
		"MsgId": null,
		"Result": 0,	
		"Count": 10000,	
		"Statistics": [
			{
				"Group": 1,	
				"Time": 1540444116, 
				"Chn": 3,
				"StrChn":"CH4",
			},
			{
				"Group": 3,			
				"Time": 1540444119, 
				"Chn": 4,
				"StrChn":"CH5",
			},
			{
				...
			},
			...
		]
	}
}

Error Code

See Response Messages Body and Common error_code for more information.